﻿Imports System.Text
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes

Namespace SpeedWidget
	''' <summary>
	''' Interaction logic for SpeedView.xaml
	''' </summary>
	Partial Public Class SpeedView
		Inherits UserControl
		Public Sub New()
			InitializeComponent()
		End Sub

		Private CurrentWidth As Double = 135.0

        Private mSpeed As Double = 0.5
        Friend Property Speed As Double
            Get
                Return Me.mSpeed
            End Get
            Set(ByVal value As Double)
                Me.mSpeed = value

                Me.arrowIndicatorImage.Margin = New Thickness((Me.CurrentWidth - 25.0) * mSpeed + 10.0, Me.arrowIndicatorImage.Margin.Top, Me.arrowIndicatorImage.Margin.Right, Me.arrowIndicatorImage.Margin.Bottom)
            End Set
        End Property
	End Class
End Namespace
